package com.ruoyi.albums.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.albums.mapper.AlbumsMapper;
import com.ruoyi.albums.domain.Albums;
import com.ruoyi.albums.service.IAlbumsService;

/**
 * 专辑Service业务层处理
 * 
 * @author lin
 * @date 2025-03-04
 */
@Service
public class AlbumsServiceImpl implements IAlbumsService 
{
    @Autowired
    private AlbumsMapper albumsMapper;

    /**
     * 查询专辑
     * 
     * @param id 专辑主键
     * @return 专辑
     */
    @Override
    public Albums selectAlbumsById(Long id)
    {
        return albumsMapper.selectAlbumsById(id);
    }

    /**
     * 查询专辑列表
     * 
     * @param albums 专辑
     * @return 专辑
     */
    @Override
    public List<Albums> selectAlbumsList(Albums albums)
    {
        return albumsMapper.selectAlbumsList(albums);
    }

    /**
     * 新增专辑
     * 
     * @param albums 专辑
     * @return 结果
     */
    @Override
    public int insertAlbums(Albums albums)
    {
        return albumsMapper.insertAlbums(albums);
    }

    /**
     * 修改专辑
     * 
     * @param albums 专辑
     * @return 结果
     */
    @Override
    public int updateAlbums(Albums albums)
    {
        return albumsMapper.updateAlbums(albums);
    }

    /**
     * 批量删除专辑
     * 
     * @param ids 需要删除的专辑主键
     * @return 结果
     */
    @Override
    public int deleteAlbumsByIds(Long[] ids)
    {
        return albumsMapper.deleteAlbumsByIds(ids);
    }

    /**
     * 删除专辑信息
     * 
     * @param id 专辑主键
     * @return 结果
     */
    @Override
    public int deleteAlbumsById(Long id)
    {
        return albumsMapper.deleteAlbumsById(id);
    }
}
